package com.example.environment.controller;

import com.example.environment.pojo.AqiStandard;
import com.example.environment.service.AqiService;
import com.example.environment.tools.common.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/aqi")
public class AQIController {
    @Autowired
    private AqiService aqiService;
    @GetMapping("/calculate")
    public ResultMsg calculateAQI(Integer pm25,Integer so2,Integer co){
        return ResultMsg.successOp(aqiService.calculateAQI(pm25,so2,co));
    }
}
